const pages=[
    M.loadVuePage("/test"),
    M.loadVuePage("/role"),
    M.loadVuePage("/system/company"),
    M.loadVuePage("/user"),
    M.loadVuePage("/resource"),
    M.loadVuePage("/goods"),
];



const Index= () => M.loadVueModule('../views/index.vue');
const  { createRouter,createWebHashHistory} =VueRouter;
const routes = [
  { path: '/', component: Index }
];
//导入pages中的页面
for (let i=0;i<pages.length;i++){
   let page=pages[i];
    routes.push({
     path: page.routerPath,
     component:page.vuePage()
   });
}
const router = createRouter({
  history: createWebHashHistory(),
  routes: routes
})
export default router;

